package com.xianniu.ltc.enums;

import lombok.Getter;

/**
 * 功能描述: 需要记录到项目中的类型
 *
 * @Param:
 * @Return:
 * @Author: wrj
 * @Date: 2021/12/9 6:36 下午
 */
@Getter
public enum ProjectReportEnum {
    A("A", "未回款"),
    B("B", "已回款"),
    C("C", "项目交付成本上限金额"),
    D("D", "LTC付款单金额"),
    E("E", "项目金额"),
    F("F", "开票金额"),
    G("G", "实际回款"),
    H("H", "收票金额"),
    I("I", "实际已付款"),
    J("J", "分包采购费用"),
    K("K", "投标费用"),
    L("L", "佣金"),
    M("M", "其他"),
    // 外来
    N("N", "派工单完成且结算完成金额"),
    O("O", "备件对应的采购金额"),
    P("P", "派工单费用"),
    Q("Q", "备件费用"),
    R("R", "服务单数量"),
    S("S", "提货单数量"),
    T("T", "派工单数量"),
    U("U", "提货单备件数量"),
    V("V", "备件DOA数量"),
    W("W", "正常工单数量"),
    X("X", "异常工单数量"),

    ;
    private String code;
    private String msg;

    ProjectReportEnum(String code, String msg){
        this.code = code;
        this.msg = msg;
    }

    /**
     * 根据code查询实例
     * @param code
     * @return
     */
    public static ProjectReportEnum getByCode(String code){
        ProjectReportEnum[] values = ProjectReportEnum.values();
        for(ProjectReportEnum value : values){
            if(value.code.equals(code)){
                return value;
            }
        }
        return null;
    }
}
